//
//  UIViewController+KVO.h
//  ImplementKVO
//
//  Created by 赵忠鹏 on 2019/3/13.
//  Copyright © 2019 内蒙小猿. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef void(^PGObservingBlock)(id observedObject, NSString *observedKey, id oldValue, id newValue);


@interface UIViewController (KVO)

- (void)PG_addObserver:(NSObject *)observer
                forKey:(NSString *)key
             withBlock:(PGObservingBlock)block;

- (void)PG_removeObserver:(NSObject *)observer forKey:(NSString *)key;

@end

NS_ASSUME_NONNULL_END
